package com.rush.manageepac.controller;

import com.rush.manageepac.entity.Implement;
import com.rush.manageepac.service.intf.ImplementService;
import com.rush.manageepac.vo.PageBean;
import com.rush.manageepac.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @outher zhy
 * 2022-08-30
 */
@RestController
@RequestMapping("api/implement/")
public class ImplementController {
    @Autowired
    private ImplementService service;

    @PostMapping("save.do")
    public R save(Implement implement){return service.save(implement);}

    @GetMapping("del.do")
    public R del(int id){return service.delete(id);}

    @PostMapping("update.do")

    public R update(Implement implement){return service.update(implement);}

    @GetMapping("page.do")
    public PageBean page(String name, int page, int limit){return service.selectPage(name,page,limit);}
}
